//
//  SYBreakPointUploading.h
//  SanYiTeaching
//
//  Created by 郑浩然 on 2019/10/8.
//  Copyright © 2019年 SanYi. All rights reserved.
//  视频上传单利

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN


typedef void(^SYBreakPointBlock)(CGFloat progress);

typedef void(^SYBreakPointPathBlock)(NSString *pathFile);

@interface SYBreakPointUploading : NSObject


/**
 初始化单利

 @return 1
 */
+ (SYBreakPointUploading *)shared;

@property (assign, nonatomic) CGFloat progress;

@property (copy, nonatomic) SYBreakPointBlock block;

@property (copy, nonatomic) SYBreakPointPathBlock pathBlock;


/**
 上传视频

 @param signature 客户端上传的签名
 @param coverPath 视频路径
 @param videoPath 封面地址
 @param fileName 文件名
 @param enableResume 是否断点续传 默认开启
 @param obj 预留字段
 */
- (void)updateSignature:(NSString *)signature
              coverPath:(NSString *)coverPath
              videoPath:(NSString *)videoPath
               fileName:(NSString *)fileName
           enableResume:(BOOL)enableResume
                  obj:(id)obj;



/**
 把视频存储到本地

 @param data 视频转换成data
 @param name 名字
 @return 1
 */
- (NSString *)writeToCacheVideo:(NSData *)data appendNameString:(NSString *)name;








@end

NS_ASSUME_NONNULL_END
